<%@page import="java.io.* , java.util.*, java.sql.*, com.myapp.struts.actionform.*, com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<html>
    <head>
        <title> View Location Details </title>
        <script language="javascript">
            function displayHTML(printContent)
            {
                var init=printContent;
                win=window.open("print.htm",'popup','toolbar=no, status=no');
                win.document.write(init);
                window.print();
            }
        </script>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <form id="view" name="view" action="viewLoc.jsp">
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <th height="26"><strong>Site  Code</strong></th>
                    <th><strong>Site Name</strong></th>
                </tr>
                <%
                                            LocationMasterDao imdao=new LocationMasterDao();
                                            Vector gp = imdao.getRows();
                    if (gp != null) {
                        Iterator itg = gp.iterator();
                        while (itg.hasNext()) {
                            LocationMasterFormBean gb = (LocationMasterFormBean) itg.next();
                            String locationCode=gb.getLocationCode();
                            String locationName=gb.getLocationName();

                %>
                <tr>
                    <td align="center"><%=locationCode%></td>
                    <td align="center"><%=locationName%></td>
                </tr>
                <% }
        }%>

            </table>
        </form>
        <p align="center"><a href='javascript:displayHTML(view.innerHTML)'><strong>Print Privew</strong></a></p>

    </body>
</html>
